#!/bin/bash
set -x
if [ "$1" == "" ];then
		workpath="."
else
		workpath=$(cd $1;pwd)
fi
echo Now,generate tags file for [$workpath]
exec ctags-exuberant -f ./tags \
-h ".php" -R \
--exclude="\.svn" \
--totals=yes \
--tag-relative=yes \
--PHP-kinds=+cf \
--regex-PHP='/abstract class ([^ ]*)/\1/c/' \
--regex-PHP='/interface ([^ ]*)/\1/c/' \
--regex-PHP='/(public |static |abstract |protected |private )+function ([^ (]*)/\2/f/' $workpath

